home *** CD-ROM | disk | FTP | other *** search
/ Champak 138 / Volume 138 Aug 19 2011 - Damaged.iso / Games / wildhearts_stage_dive.swf / scripts / DefineSprite_101 / frame_2 / DoAction_3.as < prev    next >
Text File  |  2011-08-19  |  2KB  |  89 lines

  1. n = nb._y;
  2. e = eb._x;
  3. s = sb._y;
  4. w = wb._x;
  5. r = rp._x;
  6. f = fp._y;
  7. st = sofaTop._y;
  8. px = ps._x;
  9. py = ps._y;
  10. if(!curPlayer)
  11. {
  12.    curPlayer = 1;
  13.    curRun = 1;
  14.    p1scores = 0;
  15.    p2scores = 0;
  16. }
  17. numPlays = 2;
  18. numRuns = 3;
  19. score = 0;
  20. worldRecord = 8.9;
  21. curKey = 0;
  22. if(curPlayer == 1)
  23. {
  24.    keys = [37,39,32];
  25.    keyNames = ["left","right","space"];
  26. }
  27. else
  28. {
  29.    keys = [90,88,67];
  30.    keyNames = ["cpu","cpu","cpu"];
  31. }
  32. _parent.gui.l_button.key = keys[0];
  33. _parent.gui.l_button.txt = keyNames[0];
  34. _parent.gui.r_button.key = keys[1];
  35. _parent.gui.r_button.txt = keyNames[1];
  36. _parent.gui.j_button.key = keys[2];
  37. _parent.gui.j_button.txt = keyNames[2];
  38. dist = 1000;
  39. i = 0;
  40. speed = 0;
  41. maxspeed = 15;
  42. accel = 2;
  43. decel = 0.95;
  44. rDist = dist;
  45. frict = 0.13;
  46. angleInc = 5;
  47. grav = 0.4;
  48. sofaLength = 92;
  49. sofaEnded = false;
  50. tfps = 20;
  51. afps = 20;
  52. aSpeed = 0;
  53. aCount = 0;
  54. panelwidth = 150;
  55. rightpanel = 0;
  56. pr = null;
  57. std_fmt = new TextFormat();
  58. std_fmt.color = 10066329;
  59. stdH_fmt = new TextFormat();
  60. stdH_fmt.color = 16777215;
  61. stdC_fmt = new TextFormat();
  62. stdC_fmt.color = 16711680;
  63. lrg_fmt = new TextFormat();
  64. lrg_fmt.color = 10066329;
  65. lrgH_fmt = new TextFormat();
  66. lrgH_fmt.color = 16777215;
  67. background._x = 0;
  68. sofaContainer._x = 0;
  69. player._x = px;
  70. player._y = py;
  71. for(var p in panels)
  72. {
  73.    panels[p].removeMovieClip();
  74. }
  75. for(var s in sofaItems)
  76. {
  77.    sofaItems[s].removeMovieClip();
  78. }
  79. panels = new Array();
  80. sofaItems = new Array();
  81. var x = w + door._width;
  82. while(x < e)
  83. {
  84.    panels.push(spawnBg(x));
  85.    rightpanel += panelwidth;
  86.    x += panelwidth;
  87. }
  88. stop();
  89.